<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
?>
<style>
    .content{ border: 1px solid #eee; width: 100%; padding: 10px;margin-bottom: 20px;margin-top: 10px;}
   .label-radio{padding-left: 30px;}
</style>
<div class="ibox-title">
	<h5>添加文章</h5>
</div>
<div class="ibox-content timeline">
    <div class="auth-item-model-form">
        <?php if(Yii::$app->session->hasFlash('info')){ echo Yii::$app->session->getFlash('info');} ?>
        <?php $form = ActiveForm::begin(); ?>
        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
        <?= $form->field($model, 'category_id')->dropDownList($list) ?>
        <?= $form->field($model, 'image')->widget('common\widgets\file_upload\FileUpload',[
                'config'=>[
                    "imageMaxSize" => 1048000,
                ]
            ]);
         ?>
        <?= $form->field($model, 'excerpt')->textarea(['rows' => 3])?>
        <?= $form->field($model, 'details')->widget('common\widgets\ueditor\Ueditor',[
               'options'=>[
                   'initialFrameWidth' => 1224,
                   'initialFrameHeight'=>'400',
               ],

           ]) ?>
        <?= $form->field($model, 'weight')->textInput(['maxlength' => true]) ?>
        <div class="content">
            <?= $form->field($model, 'digest')->radioList(['0' => '否', '1' => '是'],['class'=>'label-radio']) ?>
        </div>
        <div class="content">
            &nbsp;<?= $form->field($model, 'display')->radioList(['0' => '否', '1' => '是'],['class'=>'label-radio']) ?>&nbsp;
        </div>
        <div class="content">
            <?= $form->field($model, 'tags')->checkboxList($tags,['class'=>'label-radio']) ?>
        </div>
        <div class="content">
            <?= $form->field($model, 'source')->radioList(['0' =>'转载' , '1' => '自传'],['class'=>'label-radio']) ?>
        </div>

        <div class="form-group">
            <?= Html::submitButton('保存', ['class' =>  'btn btn-primary green']) ?>
        </div>
        <?php ActiveForm::end(); ?>
    </div>
</div>
